package com.lean.android.ad.core.config

import com.lean.android.ad.core.AdSdk
import com.lean.android.ad.core.splash.SplashAdView

data class AdConfig(

    val appInfoProvider: AppInfoProvider,

    val adParamsProvider: AdParamsProvider,

    val userIdProvider: UserIdProvider = UserIdProvider.Empty,

    val channelInfoProvider: ChannelInfoProvider,

    val splashAdView: SplashAdView,

    val rewardCustomFloatView: RewardCustomFloatView? = null,

    val accessPem: String,

    val umengAppKey: String
) {

    override fun toString(): String {
        return buildString {
            append("appInfo ==> packageName: ${AdSdk.appContext.packageName}  appName: ${appInfoProvider.getAppName()}, version : ${appInfoProvider.getVersion()}").append(
                "\n"
            )
            append("adParams ==> appId: ${AdSdk.getAdConfig().adParamsProvider.getPangolinId()}, splashAdId, ${AdSdk.getAdConfig().adParamsProvider.getSplashAdId()}, rewardAdId: ${AdSdk.getAdConfig().adParamsProvider.getRewardAdId()}, insertAdId: ${AdSdk.getAdConfig().adParamsProvider.getInterstitialAdId()}, feedAdId: ${AdSdk.getAdConfig().adParamsProvider.getFeedAdId()}").append(
                "\n"
            )
            append("channelInfo ==> channel: ${channelInfoProvider.getChannel()}, realChannel: ${channelInfoProvider.getRealChannel()}").append(
                "\n"
            )
            append("accessPem ==> $accessPem").append("\n")
            append("umengAppKey ==> $umengAppKey")
        }
    }
}
